package com.dokimall.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dokimall.common.to.mq.OrderTo;
import com.dokimall.common.to.mq.StockLockedTo;
import com.dokimall.common.utils.PageUtils;
import com.dokimall.ware.entity.WareSkuEntity;
import com.dokimall.ware.vo.LockStockResult;
import com.dokimall.ware.vo.PurchaseItemVo;
import com.dokimall.ware.vo.SkuHasStockVo;
import com.dokimall.ware.vo.WareSkuLockVo;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 商品库存
 *
 * @author mori
 * @email 550144898@qq.com
 * @date 2021-09-26 17:22:13
 */
public interface WareSkuService extends IService<WareSkuEntity> {

    PageUtils queryPage(Map<String, Object> params);


    void addToWare(Long skuId, Long wareId, Integer skuNum);

    List<SkuHasStockVo> cheakHasStock(List<Long> skuIds);

    Boolean orderLockStock(WareSkuLockVo wareSkuLockVo);

    void unLocked(StockLockedTo to);

    void unLocked(OrderTo to);
}

